/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 全局样式 */
body {
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 100, 200, 0.1) 0%, rgba(0, 0, 0, 0.9) 90%);
}

/* 导航链接 */
a {
    color: #4fc3f7;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: rgba(79, 195, 247, 0.1);
}

a:hover {
    color: #ffffff;
    background: rgba(79, 195, 247, 0.3);
    transform: translateY(-2px);
}

/* 主容器 */
div {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 标题 */
h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #4fc3f7, #64ffda);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 传感器数据显示 */
p {
    font-size: 1.2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 8px;
    border-left: 4px solid #4fc3f7;
    transition: all 0.3s ease;
}

p:hover {
    background: rgba(50, 50, 50, 0.8);
    transform: translateX(5px);
}

/* 数据值高亮 */
span {
    font-weight: bold;
    color: #64ffda;
    font-size: 1.3rem;
}

/* 表单样式 */
form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 控制选项组 */
input[type="radio"] {
    display: none;
}

input[type="radio"]+label {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
    border-radius: 50px;
    background: rgba(60, 60, 60, 0.6);
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="radio"]:checked+label {
    background: linear-gradient(135deg, #4fc3f7, #3a7bd5);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

/* 控制组标题 */
.control-group {
    margin-bottom: 2rem;
}

.control-group::before {
    content: attr(data-device);
    display: block;
    color: #4fc3f7;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    div {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    form {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

div,
a {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 数据卡片悬停效果 */
.data-card {
    position: relative;
    overflow: hidden;
}

.data-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.1), transparent);
    z-index: -1;
    transition: all 0.3s ease;
}

.data-card:hover::after {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3), transparent);
}